<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="./js/jquery.validate.js"></script>
<link rel="stylesheet" type="text/css" href="css/mypage.css" />
<script type="text/javascript">
	(function($) {
		$(document).ready(function() {
			if($("#email").val().length != 0){
				$("#user_pw").focus();
			}else{
				$("#email").focus();
			}
			$("#deleteUser_form").validate({
				rules : {
					email : {
						required : true,
						email : true
					},
					user_pw : {
						required : true
					},
				},
  				messages : {
					email : {
						required :"미입력",
						email : "틀림 "
					},
					user_pw : {
						required : "미입력"
					},
				}, 
				submitHandler : function(frm) {
					frm.submit();
				},
				success : function(e) {
				}
			});
		});
	})(jQuery);
</script>
<style type="text/css">
input.error,textarea.error {
	border: 1px solid #DB0000;
}

</style>
</head>
<body>
<%
if(request.getAttribute("message") != null){
%>
<form name="deleteUser_form" id="deleteUser_form" method="post" action="deleteUser.do">
	
	<div align="center" style = "padding-top: 60px"><img src = ''/></div>
	
	<div align="center" style = "padding-bottom: 90px;">
	<fieldset style = "border: 0px; background: #F6F6F6; 
				width: 380px; height: 220px;">
		<p/>
		<div id = 'loginFrm' align="left">
		<span>이메일</span>
		<input class = 'loginBox' type="text" name="email" id="email" placeholder="이메일 주소" 
		style = "font-family: 맑은 고딕; height: 30px; width: 170px;text-align: center;"/><p/>
		
		<span>비밀번호</span>
		<input class = 'loginBox' type="password" name="user_pw" id="user_pw" placeholder="비밀 번호"
		style = "font-family: 맑은 고딕; height: 30px;text-align: center;"/><br/>		
		</div>
		<p/>
		
		<span class = "error_msg_null"><%=request.getAttribute("message") %></span><br/>
		
		<input id = "loginBtn" class="submit" type="submit" value="회원탈퇴" 
		style = "width:100px; height:40px; margin-top: 20px;"/><p/>
	</fieldset>
	</div>
	</form>
<%
}else{
%>
<form name="deleteUser_form" id="deleteUser_form" method="post" action="deleteUser.do">
	
	<div align="center" style = "padding-top: 60px"><img src = ''/></div>
	
	<div align="center" style = "padding-bottom: 90px;">
	<fieldset style = "border: 0px; background: #F6F6F6; 
				width: 380px; height: 160px;;">
		<p/>
		<div id = 'loginFrm' align="left">
		<span>이메일</span>
		<input class = 'loginBox' type="text" name="email" id="email" placeholder="이메일 주소" 
		style = "font-family: 맑은 고딕; height: 30px; width: 170px;text-align: center;"/><p/>
		
		<span>비밀번호</span>
		<input class = 'loginBox' type="password" name="user_pw" id="user_pw" placeholder="비밀 번호"
		style = "font-family: 맑은 고딕; height: 30px;text-align: center;"/><br/>		
		</div>
		<p/>
		
		<input class="deleteBtn" type="submit" value="회원탈퇴" />
		
		<a href="javascript:history.back();" onfocus="this.blur();">
		<input type = "button" class= "deleteBtn" value="취소"
		style = "background-color: #5D5D5D;"
		>
		</a><p/>
	</fieldset>
	</div>
	</form>
<%
}
%>	
</body>
</html>